:root {
  font-family: 'Helvetica Neue', Helvetica, 'Microsoft YaHei', '微软雅黑', sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light;
  color: white;
  background-color: #FFC312;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 定义配色变量 - Flat UI Colors 2024风格 */
:root {
  --color-primary: #FFC312;     /* Sunflower - 向日葵黄 */
  --color-secondary: #00CEC9;   /* Energos - 青色 */
  --color-success: #22A6B3;     /* Blue Martina - 蓝色 */
  --color-info: #FDA7DF;        /* Lavender Rose - 粉紫色 */
  --color-accent: #FC427B;      /* Bara Red - 红色 */
  --color-text-dark: #2c3e50;
  --color-text-light: #7f8c8d;
  --color-bg-light: #f5f5f5;
  --color-bg-dark: #2c3e50;
  --color-warning: #FF9FF3;
  --color-error: #EE5A24;
  --color-border: #bdc3c7;
  --color-muted: #95a5a6;
  --color-aux1: #A29BFE;
  --color-aux2: #FD79A8;
  --color-aux3: #00B894;
}

a {
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: underline;
  transition: all 0.3s ease;
}
a:hover {
  color: white;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

body {
  margin: 0;
  padding: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: #FFC312;
  color: white;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: white;
}

h1 {
  color: white;
}

h1 {
  font-size: 2.5em;
  line-height: 1.1;
  margin-bottom: 1em;
  position: relative;
  display: inline-block;
}

h1::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}

button {
  border-radius: 4px;
  border: 1px solid var(--color-primary);
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: var(--color-primary);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

button:hover {
  border-color: var(--color-accent);
  background-color: var(--color-accent);
  box-shadow: 0 0 15px rgba(252, 66, 123, 0.3);
}

button:focus,
button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.card {
  background-color: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5em;
  margin: 1em 0;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 5px 15px rgba(255, 195, 18, 0.3);
}

#app {
  width: 100%;
  margin: 0;
  padding: 0;
}

.code-block {
  font-family: 'JetBrains Mono', monospace;
  background-color: var(--color-bg-dark);
  border-left: 3px solid var(--color-primary);
  padding: 1em;
  border-radius: 4px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--color-bg-light);
}

.flag {
  font-family: 'JetBrains Mono', monospace;
  background-color: rgba(243, 156, 18, 0.1);
  color: var(--color-text-dark);
  padding: 0.2em 0.5em;
  border-radius: 4px;
  font-weight: 500;
  letter-spacing: 1px;
  border: 1px solid var(--color-primary);
}

.challenge-solved {
  color: var(--color-success);
  font-weight: bold;
}

.challenge-pending {
  color: var(--color-warning);
}

.challenge-locked {
  color: #6c757d;
  opacity: 0.7;
}

/* Glitch effect for titles */
.glitch {
  position: relative;
  animation: glitch 5s infinite;
}

@keyframes glitch {
  0% { transform: translate(0); }
  2% { transform: translate(-2px, 2px); }
  4% { transform: translate(-2px, -2px); }
  6% { transform: translate(2px, 2px); }
  8% { transform: translate(2px, -2px); }
  10% { transform: translate(0); }
  100% { transform: translate(0); }
}

/* Terminal cursor effect */
.cursor::after {
  content: '|';
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  h1 {
    font-size: 1.8em;
  }
  
  .card {
    padding: 1em;
    margin: 0.5em;
  }
}
